package com.qf.pojo;

import java.time.LocalDateTime;
import java.util.LinkedList;
import java.util.List;

/**
 * @author Kuke
 * @date 2022/3/12 11:54
 * 订单实体
 */
public class Order {

    /**
     * oid` varchar(32) NOT NULL,
     *   `ordertime` datetime DEFAULT NULL,
     *   `total` double DEFAULT NULL,
     *   `state` int DEFAULT NULL,
     *   `address` varchar(30) DEFAULT NULL,
     *   `name` varchar(20) DEFAULT NULL,
     *   `telephone` varchar(20) DEFAULT NULL,
     *   `uid` varchar(32) DEFAULT NULL,
     *   PRIMARY KEY (`oid`)
     * ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3
     */

    private String oid  ;// 订单编号
    private LocalDateTime ordertime; // 下订单时间(时间戳)
    private Double total ;//订单总金额
    private int state  ; //支付状态(默认0,表示未支付,1,表示已支付)

    private String address  ;//收货地址
    private String name ; //收货人

    private String telephone ; //联系方式

    //这个订单属于哪个用户的
    private User user ;



    //订单里面包含很多个订单项
    private List<OrderItem> items = new LinkedList<>() ;

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }
    public LocalDateTime getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(LocalDateTime ordertime) {
        this.ordertime = ordertime;
    }
    public Double getTotal() {
        return total;
    }

    public void setTotal(Double total) {
        this.total = total;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<OrderItem> getItems() {
        return items;
    }

    public void setItems(List<OrderItem> items) {
        this.items = items;
    }



}
